#include <iostream>
#include "split_string.h"
vector<string> split(const string& line, char x)
{
	vector<string> result;
	typedef string::size_type string_size;
	string_size i = 0;
	
	while(i != line.size())
	{
		int flag = 0;
		while(i != line.size() && flag == 0)
		{
			flag = 1;
			if(line[i] == x)
			{
				++i;
				flag = 0;
			}
		}
					
		flag = 0;
		string_size j = i;
		while(j != line.size() && flag == 0)
		{
			if(line[j] == x)
			{
				flag = 1;
			}
			if(flag == 0)
			    ++j;
		}
		if(i != j)
		{
			result.push_back(line.substr(i, j - i));
			i = j;
		}
    }
    return result;

}
